import config from '@/config'
import http from '@/utils/request.js'

export default {
    add: {
        name: '添加字典数据',
        url: `${config.API_URL}/dicdata/add`,
        async post(data) {
            return await http.post(this.url, data)
        },
        async get(data) {
            return await http.get(this.url, data)
        }
    },
    update: {
        name: '更新字典数据',
        url: `${config.API_URL}/dicdata/update`,
        async post(data) {
            return await http.post(this.url, data)
        },
        async get(data) {
            return await http.get(this.url, data)
        }
    },
    list: {
        name: '获取字典数据列表',
        url: `${config.API_URL}/dicdata/list`,
        async post(data) {
            return await http.post(this.url, data)
        },
        async get(data) {
            return await http.get(this.url, data)
        }
    },
    details: {
        name: '获取字典数据详情',
        url: `${config.API_URL}/dicdata/details`,
        async post(data) {
            return await http.post(this.url, data)
        },
        async get(data) {
            return await http.get(this.url, data)
        }
    },
    dels: {
        name: '删除字典数据项',
        url: `${config.API_URL}/dicdata/dels`,
        async post(data) {
            return await http.post(this.url, data)
        },
        async get(data) {
            return await http.get(this.url, data)
        }
    }
}
